package com.meixiang.activity.homes.insurance;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.meixiang.R;
import com.meixiang.main.BaseActivity;
import com.meixiang.tool.Tool;
import com.meixiang.view.TitleView;
import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 保险详情
 */
public class InsuranceDetailsActivity extends BaseActivity implements View.OnClickListener {

    @Bind(R.id.title)
    TitleView titleView;
    @Bind(R.id.rl_top)
    RelativeLayout RelativeLayout ;
    @Bind(R.id.tv_insurance_classify)
    TextView tv_insurance_classify ; //保险类别
    @Bind(R.id.tv_insurance_introduc)
    TextView tv_insurance_introduc ;//保障介绍
    @Bind(R.id.tv_insurance_name)
    TextView tv_insurance_name ; //保险名称
    @Bind(R.id.ll_coverage_details)
    LinearLayout ll_coverage_details ; //保额详情
    @Bind(R.id.ll_date)
    LinearLayout ll_date ; //生效日期
    @Bind(R.id.tv_date)
    TextView tv_date ;
    @Bind(R.id.ll_time)
    LinearLayout ll_time ;  //保障时间
    @Bind(R.id.tv_time)
    TextView tv_time ;
    @Bind(R.id.ll_amount)
    LinearLayout ll_amount ; //保障额度
    @Bind(R.id.tv_amount)
    TextView tv_amount ;
    @Bind(R.id.ll_pay_money)
    LinearLayout ll_pay_money ;//支付金额
    @Bind(R.id.pay_money)
    TextView tv_pay_money ;
    @Bind(R.id.tv_clause)
    TextView tv_clause ; //保险条款
    @Bind(R.id.tv_inform)
    TextView tv_inform; //重要告知
    @Bind(R.id.tv_insure)
    LinearLayout tv_insure ; //我要投保按钮

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_insurance_details);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        titleView.setTitle(R.string.insurance_details);
        titleView.setLeftImageButton(R.mipmap.back);
        titleView.showLeftButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        tv_insure.setOnClickListener(this);
        ll_coverage_details.setOnClickListener(this);
        tv_clause.setOnClickListener(this);
        tv_inform.setOnClickListener(this);

    }





    @Override
    protected void initView() {

    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){

            case R.id.tv_insure:// 投保按钮
                startActivity(new Intent(context,PolicyDetailsActivity.class));
                break ;

            case R.id.ll_coverage_details : //投保详情
                Tool.showTextToast(context,"投保详情");
                break;

            case R.id.tv_clause : // 保险条款
                Tool.showTextToast(context,"保险条款");
                break;
            case R.id.tv_inform : //重要告知
                Tool.showTextToast(context,"重要告知");
                break;
        }
    }
}
